from sklearn.model_selection import train_test_split
from xgboost import XGBClassifier
from sklearn import metrics
import xgboost as xgb
def func_score(S,df_rating):
    df_train, df_test = train_test_split(df_rating, test_size=0.2, random_state=1234)
    X_train, y_train = df_train.iloc[:, S], df_train.iloc[:, 26]
    X_test, y_test = df_test.iloc[:, S], df_test.iloc[:, 26]
    XGB_model = xgb.XGBRegressor(objective ='multi:softmax', num_class =2)
    XGB_model.fit(X_train, y_train)
    y_pred_XGB = XGB_model.predict(X_test)
    Accuracy_XGB = metrics.accuracy_score(y_test, y_pred_XGB)
    return Accuracy_XGB